#pragma once

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief All standard UDS services (stored as request values)
 * 
 */
typedef enum {
    /* Diagnostic and Communication Management */

    UDS_SID_DSC = 0x10,
    UDS_SID_DIAGNOSTIC_SESSION_CONTROL = UDS_SID_DSC,

    UDS_SID_ER = 0x11,
    UDS_SID_ECU_RESET = UDS_SID_ER,

    UDS_SID_SA = 0x27,
    UDS_SID_SECURITY_ACCESS = UDS_SID_SA,

    UDS_SID_CC = 0x28,
    UDS_SID_COMMUNICATION_CONTROL = UDS_SID_CC,

    //!  Missing 0x29 Authorization, need ISO doc */

    UDS_SID_TP = 0x3E,
    UDS_SID_TESTER_PRESENT = UDS_SID_TP,

    UDS_SID_ATP = 0x83,
    UDS_SID_ACCESS_TIMING_PARAMETERS = UDS_SID_ATP,

    UDS_SID_SDT = 0x84,
    UDS_SID_SECURED_DATA_TRANSMISSION = UDS_SID_SDT,

    UDS_SID_CDTCS = 0x85,
    UDS_SID_CONTROL_DTC_SETTING = UDS_SID_CDTCS,

    UDS_SID_ROE = 0x86,
    UDS_SID_RESPONSE_ON_EVENT = UDS_SID_ROE,

    UDS_SID_LC = 0x87,
    UDS_SID_LINK_CONTROL = UDS_SID_LC,

    /* Data Transmission */

    //! I think??
    UDS_SID_RDBLI = 0x21,
    UDS_SID_READ_DATA_BY_LOCAL_IDENTIFIER = UDS_SID_RDBLI,

    UDS_SID_RDBI = 0x22,
    UDS_SID_READ_DATA_BY_IDENTIFIER = UDS_SID_RDBI,

    UDS_SID_RMBA = 0x23,
    UDS_SID_READ_MEMORY_BY_ADDRESS = UDS_SID_RMBA,

    UDS_SID_RSDBI = 0x24,
    UDS_SID_READ_SCALING_DATA_BY_IDENTIFIER = UDS_SID_RSDBI,

    UDS_SID_RDBPI = 0x2A,
    UDS_SID_READ_DATA_BY_PERIODIC_IDENTIFIER = UDS_SID_RDBPI,

    UDS_SID_DDDI = 0x2C,
    UDS_SID_DYNAMICALLY_DEFINE_DATA_IDENTIFIER = UDS_SID_DDDI,

    UDS_SID_WDBI = 0x2E,
    UDS_SID_WRITE_DATA_BY_IDENTIFIER = UDS_SID_WDBI,

    UDS_SID_WMBA = 0x3D,
    UDS_SID_WRITE_MEMORY_BY_ADDRESS = UDS_SID_WMBA,

    /* Stored Data Transmission */

    UDS_SID_CDTCI = 0x14,
    UDS_SID_CLEAR_DIAGNOSTIC_INFORMATION = UDS_SID_CDTCI,

    UDS_SID_RDTCI = 0x19,
    UDS_SID_READ_DTC_INFORMATION = UDS_SID_RDTCI,

    /* Input/Output Control */

    UDS_SID_IOCBI = 0x2F,
    UDS_SID_INPUT_OUTPUT_CONTROL_BY_IDENTIFIER = UDS_SID_IOCBI,

    /* Remote Activation of Routine */

    UDS_SID_RC = 0x31,
    UDS_SID_ROUTINE_CONTROL = UDS_SID_RC,

    /* Upload/Download */

    UDS_SID_RD = 0x34,
    UDS_SID_REQUEST_DOWNLOAD = UDS_SID_RD,

    UDS_SID_RU = 0x35,
    UDS_SID_REQUEST_UPLOAD = UDS_SID_RU,

    UDS_SID_TD = 0x36,
    UDS_SID_TRANSFER_DATA = UDS_SID_TD,

    UDS_SID_RTE = 0x37,
    UDS_SID_REQUEST_TRANSFER_EXIT = UDS_SID_RTE,

    UDS_SID_RFT = 0x38,
    UDS_SID_REQUEST_FILE_TRANSFER = UDS_SID_RFT,

    UDS_SID_NR = 0x7F,
    UDS_SID_NEGATIVE_RESPONSE = UDS_SID_NR
} UDS_SID_t;

#ifdef __cplusplus
}
#endif